//
//  UrbanPrinterTableViewCell.m
//  Urban
//
//  Created by Can on 2018/5/23.
//  Copyright © 2018年 hwd. All rights reserved.
//

#import "UrbanPrinterTableViewCell.h"

@implementation UrbanPrinterTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        self.selectionStyle = 0;
        //添加控件
        [self addSubviews];
    }
    return self;
}

- (void)addSubviews
{
    //右侧单选按钮
    _choseBtn = [TomamaUI createButton:0 Frame:CGRectMake(SCREENW - 15*screenW_6 - 20*screenW_6, (self.frame.size.height - 20*screenW_6)/2, 20*screenW_6, 20*screenW_6) targ:self sel:@selector(chose) titleColor:nil font:nil title:nil image:@"unselected" backGroundImage:nil];
    _choseBtn.backgroundColor = [UIColor whiteColor];
    _choseBtn.layer.cornerRadius = 10*screenW_6;
    _choseBtn.layer.masksToBounds = YES;
    [self.contentView addSubview:_choseBtn];

    //name
    _name = [TomamaUI createLabel:CGRectMake(15*screenW_6, 0, 100*screenW_6, self.frame.size.height) textAligment:0 font:[UIFont systemFontOfSize:15*screenW_6] textColor:[UIColor blackColor] text:@""];
    [self.contentView addSubview:_name];

    //model
    _model = [TomamaUI createLabel:CGRectMake(SCREENW - 200*screenW_6, 0, 150*screenW_6, self.frame.size.height) textAligment:2 font:[UIFont systemFontOfSize:15*screenW_6] textColor:[UIColor blackColor] text:@""];
    [self.contentView addSubview:_model];
    
}

- (void)chose
{
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
